﻿<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ssh免密登陆</title>
</head>
<body>
<div id="wmd-preview" class="wmd-preview"><div class="md-section-divider"></div><div class="md-section-divider"></div><h1 data-anchor-id="076a" id="ssh免密登陆">ssh免密登陆</h1><hr><blockquote data-anchor-id="5nhe" class="white-blockquote">
  <p>连接机器 192.168.9.31 <br>
  目标机器 192.168.9.85 <br>
  登陆连接机器，执行脚本</p>
</blockquote><div class="md-section-divider"></div><pre class="prettyprint linenums prettyprinted" data-anchor-id="0mpt"><ol class="linenums"><li class="L0"><code><span class="pln">ssh</span><span class="pun">-</span><span class="pln">keygen </span><span class="pun">-</span><span class="pln">t rsa</span></code></li><li class="L1"><code><span class="pln">ssh</span><span class="pun">-</span><span class="pln">copy</span><span class="pun">-</span><span class="pln">id </span><span class="pun">-</span><span class="pln">i </span><span class="pun">/</span><span class="pln">root</span><span class="pun">/.</span><span class="pln">ssh</span><span class="pun">/</span><span class="pln">id_rsa</span><span class="pun">.</span><span class="pln">pub root@192</span><span class="pun">.</span><span class="lit">168.9</span><span class="pun">.</span><span class="lit">85</span></code></li><li class="L2"><code><span class="pln">ssh root@192</span><span class="pun">.</span><span class="lit">168.9</span><span class="pun">.</span><span class="lit">85</span></code></li></ol></pre></div>
</body>
</html>